package com.itheima.demo.demo9;

import java.io.File;

public class For {
    public static void main(String[] args) {
        File file=new File("C:\\Users\\Administrator\\Desktop\\就业02");
        File[] files = file.listFiles();
        for (File filename : files) {
            System.out.println("文件名是"+filename.getName());
            System.out.println("地址为"+filename.getPath());
            if(filename.isFile()){
                System.out.println("文件大小为"+filename.length());
            }else {
                System.out.println("不是文件");
            }
            System.out.println("=====================");

        }

    }
}
